from gwr_mgwr import gwr_mgwr
import pandas as pd
import geopandas as gpd
geo_data_bc = gpd.read_file('E:/时空数据分析/Final_shp/GWR.geojson')
y = 'od_avg'
x_list = ['n_avg']
#, 'p_POI_coun', 'b_area','b_area_h','length_w'
smry=gwr_mgwr(geo_data_bc, y, x_list)
print(smry)
# import geopandas as gpd
# geo_data_bc = gpd.read_file('E:/时空数据分析/Final_shp/大湾区整合.shp')
# # month_list=list(['201706','201707','201708','201709','201710','201711','201712','201801','201802','201803','201804','201805','201806','201807','201808','201809','201810','201811','201812','201901','201902','201903','201904','201905','201906'])
# # for month in month_list:
# #     geo_data_bc['od_'+str(month)+'_n']=geo_data_bc['o_'+str(month)+'_n']+geo_data_bc['d_'+str(month)+'_n']
# #     y = 'od_'+str(month)+'_n'
# #     x_list = ['n_'+str(month)+'_a', 'p_POI_coun', 'b_area','b_area_h','length_w']
# #     smry=gwr_mgwr(geo_data_bc, y, x_list)
# #     print(smry)
# geo_data=geo_data_bc.query("CSMC=='深圳市'")
# geo_data['od_avg']=geo_data['o_avg']+geo_data['d_avg']
# y = 'o_avg'
# x_list = ['n_avg_rad']
# #, 'p_POI_coun', 'b_area','b_area_h','length_w'
# smry=gwr_mgwr(geo_data, y, x_list)
# print(smry)